//
//  OrderDetailCell.m
//  OrderSeat
//
//  Created by 王威 on 14-2-22.
//  Copyright (c) 2014年 wangwei. All rights reserved.
//

#import "OrderDetailCell.h"

@implementation OrderDetailCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (float)setContent:(NSDictionary *)dic
{
    _titleLabel.text = [dic objectForKey:@"title"];
    _contentLabel.text = [dic objectForKey:@"content"];
    if([_contentLabel getLabelHeight] > _contentLabel.height)
    {
        [_contentLabel autoHeightForMutiLines];
        self.height = _contentLabel.bottom + 8;
    }
    else
    {
        self.height = 44;
    }
    
    return self.height;
}

@end
